/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package model;

import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 *
 * @author Ekaterina
 */
@Entity
@Table (name = "family", catalog = "kardi", schema = "")
public class Family implements Serializable {
    
   @Column(name = "svias")
private String svias;
      
 @Column(name = "surname")
private String surname;

@Column(name = "name")
private String name;

@Column(name = "middle")
private String middle;
            
     @Column(name = "birthday")
private String birthday;
     
      @Id
@GeneratedValue
@Column (name="id")
private Integer id = null;
    
    @ManyToOne
    @JoinColumn(name = "worker",referencedColumnName = "id")
    private Worker worker;

    public String getSvias() {
        return svias;
    }

    public String getSurname() {
        return surname;
    }

    public String getName() {
        return name;
    }

    public String getMiddle() {
        return middle;
    }

    public String getBirthday() {
        return birthday;
    }

    public Integer getId() {
        return id;
    }

    public Worker getWorker() {
        return worker;
    }

    public void setSvias(String svias) {
        this.svias = svias;
    }

    public void setSurname(String surname) {
        this.surname = surname;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setMiddle(String middle) {
        this.middle = middle;
    }

    public void setBirthday(String birthday) {
        this.birthday = birthday;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public void setWorker(Worker worker) {
        this.worker = worker;
    }
    
    
    
}
